home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / nihcl-30.lha / nihcl-3.0 / lib / Template_h < prev    next >
Text File  |  1990-05-19  |  2KB  |  63 lines

  1. #ifndef THIS_CLASS_H
  2. #define THIS_CLASS_H
  3.  
  4. /*$Header: /afs/alw.nih.gov/unix/sun4_40c/usr/local/src/nihcl-3.0/share/lib/RCS/Template_h,v 3.0 90/05/20 00:21:43 kgorlen Rel $*/
  5.  
  6. /* Template.h -- example header file for an NIH Library class
  7.  
  8.     THIS SOFTWARE FITS THE DESCRIPTION IN THE U.S. COPYRIGHT ACT OF A
  9.     "UNITED STATES GOVERNMENT WORK".  IT WAS WRITTEN AS A PART OF THE
  10.     AUTHOR'S OFFICIAL DUTIES AS A GOVERNMENT EMPLOYEE.  THIS MEANS IT
  11.     CANNOT BE COPYRIGHTED.  THIS SOFTWARE IS FREELY AVAILABLE TO THE
  12.     PUBLIC FOR USE WITHOUT A COPYRIGHT NOTICE, AND THERE ARE NO
  13.     RESTRICTIONS ON ITS USE, NOW OR SUBSEQUENTLY.
  14.  
  15. Author:
  16.     K. E. Gorlen
  17.     Computer Systems Laboratory, DCRT
  18.     National Institutes of Health
  19.     Bethesda, MD 20892
  20.  
  21. Modification History:
  22.  
  23. $Log:    Template_h,v $
  24. # Revision 3.0  90/05/20  00:21:43  kgorlen
  25. # Release for 1st edition.
  26. */
  27.  
  28. // Define "MI" if this class uses multiple inheritance:
  29. //#ifndef MI
  30. //#define MI
  31. //#endif
  32.  
  33. #include "BASE_CLASS.h"
  34. // #include .h files for other classes used
  35. // Insert only class declarations for classes accessed
  36. // by pointer and reference ONLY
  37.  
  38. // If BASE_CLASS is Object:
  39. // class THIS_CLASS: public VIRTUAL Object {
  40.  
  41. class THIS_CLASS: public BASE_CLASS {
  42.     DECLARE_MEMBERS(THIS_CLASS);
  43. // member variables here
  44. protected:        // storer() functions for object I/O
  45.     virtual void storer(OIOofd&) const;
  46.     virtual void storer(OIOout&) const;
  47. public:
  48.     bool operator==(const THIS_CLASS&) const;
  49.     bool operator!=(const THIS_CLASS& a) const
  50.         { return !(*this==a); }
  51.     virtual    int compare(const Object&) const;
  52.     virtual Object* copy() const;        // shallowCopy() default
  53.                                                 // if not defined
  54.     virtual void deepenShallowCopy();
  55.     virtual unsigned hash() const;
  56.     virtual bool isEqual(const Object&) const;
  57.     virtual void printOn(ostream& strm =cout) const;
  58.     virtual const Class* species() const;
  59. };
  60.  
  61. #endif
  62.